GDS Verification Form





<!--- <cfparam name="Fund_ID" type="integer" default="0" />
<cfparam name="Organization_ID" type="integer" default="0" />
<cfparam name="returnView" type="string" default="funds" />
<cfparam name="passback" type="string" default="" />

<cfscript>
	fundGateway = new assets.calgrants.com.gateway.FundGateway();
	fund = fundGateway.get(Fund_ID = Fund_ID);
	if (fund.getFund_ID() eq 0 AND request.authUser.organizationID gt 0) {
		fund.setOrganization_ID(request.authUser.organizationID);
	} else if (Organization_ID gt 0) {
		fund.setOrganization_ID(Organization_ID);
	}
	if (fund.getFund_ID() eq 0) {
		fund.setRequested_By_ID(GetAuthUser());
		fund.setProgram_Year(request.currentProgramYear);
	}
</cfscript>

<cfif fund.getOrganization_ID() eq 0>

	<cfset returnView = "editFund" />
	<cfset cancelView = "funds" />
	<cfset passback = "Fund_ID,0" />
	<cfinclude template="/assets/calgrants/ui/forms/selectOrganization.cfm">

<cfelseif fund.getOrganization_ID() gt 0 and IsNumeric(fund.getFund_ID())>

	<cfscript>
		base = new assets.calgrants.com.Base();
		passbackQueryString = base.passbackToQueryString(passback);
		organizationGateway = new assets.calgrants.com.gateway.OrganizationGateway();
		organization = organizationGateway.get(Organization_ID = fund.getOrganization_ID());
		userGateway = new assets.calgrants.com.gateway.UserGateway();
		requestedBy = userGateway.get(User_ID = fund.getRequested_By_ID());
		approvedBy = userGateway.get(User_ID = fund.getApproved_By_ID());
		workshopGateway = new assets.calgrants.com.gateway.WorkshopGateway();
		workshops = workshopGateway.query(Organization_ID = fund.getOrganization_ID(), Approved = 1, Program_Year = request.currentProgramYear);
		fundWorkshopGateway = new assets.calgrants.com.gateway.FundWorkshopGateway();
		fundWorkshops = fundWorkshopGateway.query(Fund_ID = fund.getFund_ID());
		oapGateway = new assets.calgrants.com.gateway.OAPGateway();
		qOap = oapGateway.query(Organization_ID = fund.getOrganization_ID(), Program_Year = fund.getProgram_Year());
		oap = oapGateway.get(OAP_ID = qOAP.OAP_ID);
		oapValueGateway = new assets.calgrants.com.gateway.OAPValueGateway();
		oapValues = oapValueGateway.query(oapValueIDs = oap.getOAP_Value_IDs());
		if (fund.getProgram_Year() eq "2013-2014") {
			fundSurveyGateway = new assets.calgrants.com.gateway.FundSurvey2014Gateway();
		} else if (fund.getProgram_Year() eq "2012-2013") {
			fundSurveyGateway = new assets.calgrants.com.gateway.FundSurvey2013Gateway();
		} else if (fund.getProgram_Year() eq "2011-2012") {
			fundSurveyGateway = new assets.calgrants.com.gateway.FundSurvey2012Gateway();
		} else if (fund.getProgram_Year() eq "2010-2011") {
			fundSurveyGateway = new assets.calgrants.com.gateway.FundSurvey2011Gateway();
		} else if (fund.getProgram_Year() eq "2009-2010") {
			fundSurveyGateway = new assets.calgrants.com.gateway.FundSurvey2010Gateway();
		}
		qFundSurvey = fundSurveyGateway.query(Fund_ID = fund.getFund_ID());
		fundSurvey = fundSurveyGateway.get(Fund_Survey_ID = IIf(fund.getFund_ID() gt 0, qFundSurvey.Fund_Survey_ID, 0));
		eligibleWorkshopCount = 0;
		ineligibleWorkshopCount = 0;
	</cfscript>
	<cfloop query="workshops">
		<cfif Student_Count_Web gt 0>
			<cfset eligibleWorkshopCount = eligibleWorkshopCount + 1 />
		<cfelse>
			<cfset ineligibleWorkshopCount = ineligibleWorkshopCount + 1 />
		</cfif>
	</cfloop>

	<script type="text/javascript" language="javascript">
	<!--
		<cfoutput>
			var fundID = #fund.getFund_ID()#;
			var signature = "#Trim(requestedBy.getFirst_Name())# #Trim(requestedBy.getLast_Name())#";
		</cfoutput>
		
		validate = function() {
			var errors = "";
			var valid = true;
			
			var payeeAddress = $("#Payee_Address").val();
			var pattern = new RegExp("\\b[p]*(ost)*\\.*\\s*[o|0]*(ffice)*\\.*\\s*b[o|0]x\\b", "i");
			if (payeeAddress.match(pattern)) {
				valid = false;
				errors += "Payments cannot be mailed a post office box.  Please enter a street address.\n";
			}
			if (fundID == 0) {
				if ($("#Signature").val() !== signature) {
					valid = false;
					errors += "Signature must be the same as your name";	
				}
			}
			if (!valid) {
				alert(errors);
			} else {
				var checkTo = $("#Payee_Organization").val();
				var mailingAddy = $("#Payee_Organization").val() + "\n" + $("#Payee_Department").val() + "\nAttention: " + $("#Payee_First_Name").val() + " " + $("#Payee_Last_Name").val() + "\n" + $("#Payee_Address").val() + "\n" + $("#Payee_City").val() + ", CA " + $("#Payee_Zip_Code").val();
				if (!confirm("Please confirm the following information\n______________________________________\n\n" + "Check will be payable to:\n\n" + checkTo + "\n\n" + "Check will be shipped via UPS or FedEx to:\n\n" + mailingAddy)) {
					return false;
				};	
			}
			return valid;
		}
		$(function() {
			$("#fundModal").modal();
			resizeModal("fundModal");
		})
	//-->
	</script>
	
	<style type="text/css">
		.slim-col {
			width: 70px;
		}
		.grid-table {
			width: 1010px;
		}
		.q {
			padding-bottom: 10px;
		}
		.text-well {
			width: 780px;
		}
		.ta {
			width: 780px;
			height: 100px;
		}
	</style>
	
	<cfoutput>
	
		<cfform id="fundForm" name="fundForm" action="#script_name#" method="post" onsubmit="return validate();">
			<cfinput type="hidden" name="action" value="saveFund" />
			<cfinput type="hidden" name="view" value="#returnView#" />
			<cfinput type="hidden" name="Fund_ID" value="#fund.getFund_ID()#" />
			<cfinput type="hidden" name="Organization_ID" value="#fund.getOrganization_ID()#" />
			<cfinput type="hidden" name="Requested_By_ID" value="#fund.getRequested_By_ID()#" />
			<cfinput type="hidden" name="Program_Year" value="#fund.getProgram_Year()#" />
			<cfif IsDefined("passback")>
				<cfloop index="keyValue" list="#passback#" delimiters=";">
					<cfinput type="hidden" name="#ListFirst(keyValue)#" value="#ListLast(keyValue)#" />
				</cfloop>
			</cfif>
			
			<div id="fundModal" class="modal modal-fullscreen" data-backdrop="static">
				<div class="modal-header">
					<h3>Site Support Funds Request</h3>
				</div>
				<div class="modal-body">
				
					<div class="container-fluid">
						<!--- Payee Info --->
						<cfif eligibleWorkshopCount gt 0>
							<div class="row-fluid">
								<div class="span12">
									<h3>Payee Information</h3>
									<cfif fund.getFund_ID() eq 0>
										<p>Enter the exact organization name as it should appear on the check and the address where payment should be mailed.  Please include the phone and e-mail address of the payee.</p>
										<p>If any of the payee information is incorrect, payment may be delayed or lost. Also note, payment will only be made to organizations, <u>not individuals</u>.</p>
									</cfif>
								</div>
							</div>
							<div class="row-fluid">					
								<div class="span4">
									<cfif IsUserInRole("Super User")>
										<div class="clearfix">
											<label class="required">Status</label>
											<cfselect name="Approved" required="yes" message="Status is required" class="span9">
												<option value="0"<cfif fund.getApproved() eq 0> selected</cfif>>Not approved</option>
												<option value="1"<cfif fund.getApproved() eq 1> selected</cfif>>Approved</option>
											</cfselect>
										</div>
									<cfelse>
										<div class="clearfix">
											<cfif fund.getFund_ID() eq 0>
												<cfset status = "New" />
											<cfelseif fund.getApproved() eq 1>
												<cfset status = "Approved" />
											<cfelse>
												<cfset status = "Pending Approval" />
											</cfif>
											<label>Status</label>
											<input type="text" id="status" name="status" value="#status#" class="span12" disabled="disabled" />
											<cfinput type="hidden" name="Approved" value="#fund.getApproved()#" />
										</div>
									</cfif>
									<div class="clearfix">
										<label class="required">First Name</label>
										<cfinput type="text" name="Payee_First_Name" value="#fund.getPayee_First_Name()#" required="yes" message="First Name is required" class="span12" />
									</div>
									<div class="clearfix">
										<label class="required">Last Name</label>
										<cfinput type="text" name="Payee_Last_Name" value="#fund.getPayee_Last_Name()#" required="yes" message="Last Name is required" class="span12" />
									</div>
									<div class="clearfix">
										<label class="required">Phone</label>
										<cfinput type="text" name="Payee_Phone" value="#fund.getPayee_Phone()#" required="yes" validate="telephone" placeholder="######-######-########" message="Phone is required and must be a valid telephone number" class="span12" />
									</div>
									<div class="clearfix">
										<label class="required">E-mail</label>
										<cfinput type="text" name="Payee_Email" value="#fund.getPayee_Email()#" required="yes" validate="email" message="E-mail is required and must be a valid e-mail address" class="span12" />
									</div>
									<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
										<div class="clearfix">
											<label class="required">Tax ID</label>
											<cfinput type="text" name="Payee_Tax_ID" value="#fund.getPayee_Tax_ID()#" class="span12" />
										</div>
									</cfif>
								</div>
								<div class="span4">
									<div class="clearfix">
										<label class="required">Organization/School</label>
										<cfinput type="text" name="Payee_Organization" value="#fund.getPayee_Organization()#" required="yes" message="Organization/School is required" class="span12" />
									</div>
									<div class="clearfix">
										<label class="required">Office/Department</label>
										<cfinput type="text" name="Payee_Department" value="#fund.getPayee_Department()#" required="yes" message="Office/Department is required" class="span12" />
									</div>
									<div class="clearfix">
										<label class="required">Address - No PO Boxes</label>
										<cfinput type="text" name="Payee_Address" value="#fund.getPayee_Address()#" required="yes" message="Address is required and cannot be a PO Box" class="span12" />
									</div>
									<div id="cityZipCodeContainer" class="clearfix">
										<div class="row-fluid">
											<div class="span8">
												<label for="Payee_City" class="required">City</label>
												<cfinput type="text" name="Payee_City" value="#fund.getPayee_City()#" required="yes" message="City is required" class="span12" />
											</div>
											<div class="span4">
												<label for="Payee_Zip_Code" class="required">Zip Code</label>
												<cfinput type="text" name="Payee_Zip_Code" value="#fund.getPayee_Zip_Code()#" required="yes" validate="zipcode" placeholder="##########" message="Zip Code is required and must be a valid zip code" class="span12" />
											</div>
										</div>
									</div>
									<!--- <div class="clearfix">
										<label class="required">City</label>
										
									</div>
									<div class="clearfix">
										<label class="required">Zip Code</label>
										
									</div> --->
								</div>
								<div class="span4">
									<!--- <cfoutput> --->
										<div class="text-control clearfix">
											<label>Organization</label>
											#organization.getOrganization()#<br />
											#organization.getAddress()#<br />
											#organization.getCity()#, CA #organization.getZip_Code()#
										</div>
										<cfif fund.getFund_ID() gt 0>
											<div class="text-control">
												<label>Requested By</label>
												#requestedBy.getFirst_Name()# #requestedBy.getLast_Name()#<br />
												<a href="mailto:#requestedBy.getEmail()#">#requestedBy.getEmail()#</a><br />
												#requestedBy.getPhone()#<cfif Len(Trim(requestedBy.getExtension())) gt 0> x #requestedBy.getExtension()#</cfif>
											</div>
											<div class="text-control">
												<label>Signed By</label>
												#fund.getSignature()#
											</div>
										</cfif>
										<cfif fund.getApproved_By_ID() gt 0>
											<div class="text-control">
												<label>Approved By</label>
												#approvedBy.getFirst_Name()# #approvedBy.getLast_Name()#
											</div>
											<div class="text-control">
												<label>Approval Date</label>
												#DateFormat(fund.getApproved_Date(), "m/d/yyyy")#
											</div>
										</cfif>
										<cfif fund.getFund_ID() gt 0>
											<div class="text-control">
												<label>Fund ID</label>
												#fund.getFund_ID()#
											</div>
											<div class="text-control">
												<label>Date Created</label>
												#DateFormat(fund.getDate_Created(), "mmmm d yyyy")# @ #TimeFormat(fund.getDate_Created(), "h:mmtt")#
											</div>
										</cfif>
									<!--- </cfoutput> --->
								</div>
							</div>
						<cfelseif fund.getFund_ID() eq 0>
							<cfinput type="hidden" name="Approved" value="#fund.getApproved()#" />
							<cfinput type="hidden" name="Payee_First_Name" value="#requestedBy.getFirst_Name()#" />
							<cfinput type="hidden" name="Payee_Last_Name" value="#requestedBy.getLast_Name()#" />
							<cfinput type="hidden" name="Payee_Phone" value="#requestedBy.getPhone()#" />
							<cfinput type="hidden" name="Payee_Email" value="#requestedBy.getEmail()#" />
							<cfinput type="hidden" name="Payee_Tax_ID" value="" />
							<cfinput type="hidden" name="Payee_Organization" value="#organization.getOrganization()#" />
							<cfinput type="hidden" name="Payee_Department" value="" />
							<cfinput type="hidden" name="Payee_Address" value="#organization.getAddress()#" />
							<cfinput type="hidden" name="Payee_City" value="#organization.getCity()#" />
							<cfinput type="hidden" name="Payee_Zip_Code" value="#organization.getZip_Code()#" />
						</cfif>
						<!--- Workshops --->
						<div class="row-fluid">
							<div class="span12">
			
								<h3>Workshops</h3>
								<cfif workshops.RecordCount gt 0>
									<cfif fund.getFund_ID() eq 0>
										<p>The workshops your organization conducted are listed below. Please enter attendance counts based on sign-in sheets.  If sign-in sheets are not available please estimate. The attendance counts may be different than exit survey counts. Also indicate the services that were offered at your workshop.</p>
									</cfif>
									<table class="table table-hover table-bordered">
										<thead>
											<tr>
												<th>Workshop</th>
												<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
													<th>Exit Surveys (W/P)</th>
												</cfif>
												<th>Funds Eligible</th>
												<th>Student Attendance</th>
												<th>Parent / Guardian Attendance</th>
												<th>Volunteer / Staff Attendance</th>
												<th>Computer Count</th>
												<th>Basic Services</th>
												<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
													<th>Fund Amount</th>
												</cfif>
											</tr>
										</thead>
										<tbody>
											<cfif fundWorkshops.RecordCount gt 0>
												<cfloop query="fundWorkshops">
													<cfinput type="hidden" name="Fund_Workshop_ID" value="#Fund_Workshop_ID#" />
													<cfinput type="hidden" name="Workshop_ID" value="#Workshop_ID#" />
													<cfset studentCount = Student_Count_Web + Student_Count_PB />
													<tr>
														<td>
															#Site#<br />
															#DateFormat(Workshop_Date, "m/d/yyyy")# #TimeFormat(Start_Time, "h:mmtt")#-#TimeFormat(End_Time, "h:mmtt")#
														</td>
														<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
															<td>#studentCount# (#Student_Count_Web#/#Student_Count_PB#)</td>
														</cfif>
														<td>
															<cfif Student_Count gte 25 and Student_Count_Web gt 0>
																Yes
															<cfelse>
																No
															</cfif>
														</td>
														<td><cfinput type="text" name="Student_Count_#Workshop_ID#" value="#Student_Count#" required="yes" validate="integer" message="Student Attendance is required and must be a number" style="width: 35px;"></td>
														<td><cfinput type="text" name="Parent_Count_#Workshop_ID#" value="#Parent_Count#" required="yes" validate="integer" message="Parent Attendance is required and must be a number" style="width: 35px;"></td>
														<td><cfinput type="text" name="Volunteer_Count_#Workshop_ID#" value="#Volunteer_Count#" required="yes" validate="integer" message="Volunteer Attendance is required and must be a number" style="width: 35px;"></td>
														<td><cfinput type="text" name="Computer_Count_#Workshop_ID#" value="#Computer_Count#" required="yes" validate="integer" message="Computer Count is required and must be a number" style="width: 35px;"></td>
														<td>
															<cfif fund.getFund_ID() eq 0>
																<label class="checkbox">
																	<input type="checkbox" name="Online_#Workshop_ID#" value="true">
																	Computer lab access to complete FAFSA/CA Dream Act Application
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="FAFSA_On_The_Web_#Workshop_ID#" value="true">
																	FAFSA on the Web worksheet presentation
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="Financial_Aid_Presentation_#Workshop_ID#" value="true">
																	Cal Grant &amp; other financial aid overview
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="Small_Group_#Workshop_ID#" value="true">
																	One-on-one or small group assistance
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="AB540_#Workshop_ID#" value="true">
																	AB540/CA Dream Act assistance
																</label>
															<cfelse>
																<label class="checkbox">
																	<input type="checkbox" name="Online_#Workshop_ID#" value="true"<cfif Online> checked</cfif>>
																	Computer lab access to complete FAFSA/CA Dream Act Application
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="FAFSA_On_The_Web_#Workshop_ID#" value="true"<cfif FAFSA_On_The_Web> checked</cfif>>
																	FAFSA on the Web worksheet presentation
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="Financial_Aid_Presentation_#Workshop_ID#" value="true"<cfif Financial_Aid_Presentation> checked</cfif>>
																	Cal Grant &amp; other financial aid overview
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="Small_Group_#Workshop_ID#" value="true"<cfif Small_Group> checked</cfif>>
																	One-on-one or small group assistance
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="AB540_#Workshop_ID#" value="true"<cfif AB540> checked</cfif>>
																	AB540/CA Dream Act assistance
																</label>
															</cfif>
														</td>
														<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
															<td>
																<cfselect name="Fund_Amount_#Workshop_ID#" required="yes" message="Fund Amount is required" style="width: 80px;">	
																	<option value="0"<cfif Fund_Amount eq 0> selected</cfif>>$0</option>
																	<cfif Program_Year neq "2012-2013">
																		<option value="300"<cfif Fund_Amount eq 300> selected</cfif>>$300</option>
																	<cfelse>
																		<option value="250"<cfif Fund_Amount eq 250> selected</cfif>>$250</option>
																		<option value="350"<cfif Fund_Amount eq 350> selected</cfif>>$350</option>
																	</cfif>
																</cfselect>
															</td>
														<cfelse>
															<cfinput type="hidden" name="Fund_Amount_#Workshop_ID#" value="#Fund_Amount#" />
														</cfif>
													</tr>
												</cfloop>
											</cfif>
											<cfif workshops.RecordCount gt 0>
												<cfloop query="workshops">
													<cfif ListFind(ValueList(fundWorkshops.Workshop_ID), Workshop_ID) eq 0>
														<cfinput type="hidden" name="Fund_Workshop_ID" value="0" />
														<cfinput type="hidden" name="Workshop_ID" value="#Workshop_ID#" />
														<tr> 
															<td>
																#Site#<br />
																#DateFormat(Workshop_Date, "m/d/yyyy")# #TimeFormat(Start_Time, "h:mmtt")#-#TimeFormat(End_Time, "h:mmtt")#
															</td>
															<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
																<td>#Student_Count# (#Student_Count_Web#/#Student_Count_PB#)</td>
															</cfif>
															<td>
																<cfif Student_Count gte 25 and Student_Count_Web gt 0>
																	Yes
																<cfelse>
																	No
																</cfif>
															</td>
															<td><cfinput type="text" name="Student_Count_#Workshop_ID#" value="0" required="yes" validate="integer" message="Student Attendance is required and must be a number" style="width: 35px;"></td>
															<td><cfinput type="text" name="Parent_Count_#Workshop_ID#" value="0" required="yes" validate="integer" message="Parent Attendance is required and must be a number" style="width: 35px;"></td>
															<td><cfinput type="text" name="Volunteer_Count_#Workshop_ID#" value="0" required="yes" validate="integer" message="Volunteer Attendance is required and must be a number" style="width: 35px;"></td>
															<td><cfinput type="text" name="Computer_Count_#Workshop_ID#" value="0" required="yes" validate="integer" message="Computer Count is required and must be a number" style="width: 35px;"></td>
															<td>
																<label class="checkbox">
																	<input type="checkbox" name="Online_#Workshop_ID#" value="true">
																	Computer lab access to complete FAFSA/CA Dream Act Application
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="FAFSA_On_The_Web_#Workshop_ID#" value="true">
																	FAFSA on the Web worksheet presentation
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="Financial_Aid_Presentation_#Workshop_ID#" value="true">
																	Cal Grant &amp; other financial aid overview
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="Small_Group_#Workshop_ID#" value="true">
																	One-on-one or small group assistance
																</label>
																<label class="checkbox">
																	<input type="checkbox" name="AB540_#Workshop_ID#" value="true">
																	AB540/CA Dream Act assistance
																</label>
															</td>
															<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
																<td>
																	<cfselect name="Fund_Amount_#Workshop_ID#" required="yes" message="Fund Amount is required" style="width: 80px;">	
																		<option value="0">0</option>
																		<cfif Program_Year neq "2012-2013">
																			<option value="300">$300</option>
																		<cfelse>
																			<option value="250">$250</option>
																			<option value="350">$350</option>
																		</cfif>
																	</cfselect>
																</td>
															<cfelse>
																<cfinput type="hidden" name="Fund_Amount_#Workshop_ID#" value="0" />
															</cfif>
														</tr>
													</cfif>
												</cfloop>
											</cfif>
										</tbody>
									</table>
								<cfelse>
									<div class="alert alert-info notFound">No workshops</div>
								</cfif>
							</div>
						</div>
						<!--- OAP --->
						<div class="row-fluid">
							<div class="span12">
								<h3>Outreach Actvities</h3>
								<cfif fund.getFund_ID() eq 0 or NOT fund.getApproved()>
									<p>Below are the outreach activities you listed in your Outreach Action Plan. Please confirm which outreach activities were conducted by checking off the box to the left of the activity, and list any new activities not previously listed in your Outreach Action Plan.</p>
									<cfinclude template="/assets/calgrants/ui/forms/fundOAP.cfm">
								<cfelse>
									<cfinclude template="/assets/calgrants/ui/details/fundOAP.cfm">
								</cfif>
								<!--- <cfoutput query="oapValues" group="Category">
									<h4>#Category#</h4>
									<div class="well text-well">
										<cfoutput group="Subcategory">
											<cfif Len(Trim(Subcategory)) gt 0><p><u>#Subcategory#</u></p></cfif>
												<cfif fund.getFund_ID() eq 0 or NOT fund.getApproved()>
													<cfoutput>
														<label class="checkbox">
															<input type="checkbox" name="OAP_Value_IDs" value="#OAP_Value_ID#"<cfif ListFind(fund.getOAP_Value_IDs(), OAP_Value_ID) gt 0> checked</cfif> />
															#Description#
														</label>
													</cfoutput>
												<cfelse>
													<ul style="list-style-type: disc">
														<cfoutput>
															<cfif ListFind(fund.getOAP_Value_IDs(), OAP_Value_ID) gt 0>
																<li style="margin-top: 5px;" class="text-success">#Description#</li>
															<cfelse>
																<li style="margin-top: 5px;" class="text-error">#Description#</li>
															</cfif>
														</cfoutput>
													</ul>
												</cfif>
										</cfoutput>
									</div>
								</cfoutput>
								<h4>Other Outreach Activities</h4>
								<cfif fund.getFund_ID() eq 0>
									<p>If you performed other outreach activities not listed above, please describe:</p>
								</cfif>
								<cfif NOT fund.getApproved()>
									<cftextarea name="OAP_Other" maxlength="2000" class="ta" value="#fund.getOAP_Other()#"></cftextarea>
								<cfelse>
									<cfoutput>
										<div class="well text-well">
											<cfif Len(Trim(fund.getOAP_Other())) gt 0>
												#fund.getOAP_Other()#
											<cfelse>
												Did not answer
											</cfif>
										</div>
									</cfoutput>
								</cfif> --->
							</div>
						</div>
						<!--- Survey --->
						<div class="row-fluid">
							<div class="span12">
								<h3>Organizer Survey</h3>
								<cfinput type="hidden" name="Fund_Survey_ID" value="#fundSurvey.getFund_Survey_ID()#" />
								<cfif fund.getFund_ID() eq 0 OR NOT fund.getApproved()>
									<cfinclude template="/assets/calgrants/ui/forms/fundSurvey#ListLast(fund.getProgram_Year(), '-')#.cfm">
								<cfelse>
									<cfinclude template="/assets/calgrants/ui/details/fundSurvey#ListLast(fund.getProgram_Year(), '-')#.cfm">
								</cfif>					
							</div>
						</div>
						<!--- Signature --->
						<cfif fund.getFund_ID() eq 0 and eligibleWorkshopCount gt 0>
							<div class="row-fluid">
								<div class="span12">
									<h3>Signature</h3>
									<div class="clearfix">
										<cfinput type="text" name="Signature" value="#fund.getSignature()#" required="yes" message="Signature is required and must be the same as your name" class="span3" /><br />
										#requestedBy.getFirst_Name()# #requestedBy.getLast_Name()#
									</div>
								</div>
							</div>
						</cfif>
						<!--- Buttons
						<div class="row-fluid">
							<div class="span12">
								<span class="pull-right"> 
									<a href="?view=#returnView#&#passbackQueryString#" class="btn btn-success">Cancel</a>
									<cfinput type="submit" name="saveButton" class="btn btn-success" value="Save" />
									<cfif (IsUserInRole("Super User") OR IsUserInRole("Regional Admin")) AND fund.getFund_ID() gt 0>
										<cfinput type="submit" name="invoiceButton" class="btn btn-success" value="Save + Generate Invoice" />
									</cfif>
								</span>
							</div>
						</div> --->
					</div>
		
				</div>
				<div class="modal-footer">
					<a href="?view=#returnView#&#passbackQueryString#" class="btn btn-success">Cancel</a>
					<button type="submit" name="saveButton" class="btn btn-success">Save</button>
					<cfif (IsUserInRole("Super User") OR IsUserInRole("Regional Admin")) AND fund.getFund_ID() gt 0>
						<cfinput type="submit" name="invoiceButton" class="btn btn-success" value="Save + Generate Invoice" />
					</cfif>
				</div>
			</div>
		</cfform>
	
	</cfoutput>

<cfelse>
	<div class="alert alert-info notFound">Site Support Funds Request not found</div>
</cfif>	

<!--- <cfparam name="fundID" type="integer" default="0">
<cfparam name="organizationID" type="integer" default="0">
<cfparam name="workshopIDs" type="string" default="">
<cfparam name="rv" type="string" default="funds">

<cfoutput>
	
	<cfif organizationID eq 0>
	
		<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
		
			<p>Select an organization.</p>
	
			<cfset organizations = application.organizationGateway.getAllAsQuery(fieldlist = "*", organizationID = organizationID, regionID = regionID, approved = "yes")>

			<cfoutput>
				<cfform name="selectOrganizationForm" id="selectOrganizationForm" action="#script_name#" method="post">
					<cfinput type="hidden" name="fundID" value="#fundID#">
					<cfinput type="hidden" name="view" value="#view#">
		
					<div class="buttonBar">
						<a href="#script_name#?view=funds" class="formLink2">Cancel</a>
						<cfinput type="submit" name="nextButton" id="nextButton" value="Next" class="formButton">
					</div>
		
					<div id="organizationsContainer" style="display: block; visibility: visible;">
						<table class="list">
							<tr>
								<th>Organization</th>
								<th>Address</th>
								<th>City</th>
								<th nowrap="nowrap">Zip Code</th>
								<th>County</th>
								<th>Status</th>
							</tr>
							<cfloop query="organizations">
								<tr<cfif currentRow mod 2 eq 0> class="evenRow"<cfelse> class="oddRow"</cfif>>
									<td><cfinput type="radio" name="organizationID" value="#Organization_ID#">&nbsp;#Organization#</td>
									<td>#Address#</td>
									<td>#City#</td>
									<td>#Zip_Code#</td>
									<td>#County#</td>
									<td>
										<cfif Approved>
											Approved
										<cfelse>
											<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
												<font color="red">Not approved</font>
											<cfelse>
												Pending approval
											</cfif>
										</cfif>
									</td>
								</tr>
							</cfloop>
						</table>
					</div>
		
				</cfform>
	
			</cfoutput>
		<cfelse>
			<cflocation url="#script_name#?view=#rv#" addtoken="no">
		</cfif>

	<cfelseif organizationID gt 0>
	
		<cfset unfundedApprovedWorkshopIDs = application.fundWorkshopGateway.getOrganizationUnfundedApprovedWorkshopsIDs(organizationID)>
		
		<cfif fundID eq 0 and ListLen(unfundedApprovedWorkshopIDs) eq 0>
		
			<div class="buttonBar">
				<a href="#script_name#?view=funds" class="formLink2">Cancel</a>
			</div>
		
			<cfset funds = application.fundGateway.getAllAsQuery(organizationIDs = organizationID)>
			
			<cfif funds.RecordCount gt 0>
			
				<p>A site support funds request has already been submitted for your organization by #funds.First_Name# #funds.Last_Name# on #DateFormat(funds.fundDate, "m/d/yyyy")#.</p>
			
				<cfset fundedWorkshopIDs = application.fundWorkshopGateway.getOrganizationFundedWorkshopIDs(organizationID)>
				<cfset fundedWorkshops = application.workshopGateway.getAllAsQuery(workshopIDs = fundedWorkshopIDs)>
				
				<cfif ListLen(fundedWorkshopIDs) gt 0>

					<p>The request included the following workshops:</p>
					
					<ul>
						<cfloop query="fundedWorkshops">
							<li>#DateFormat(Workshop_Date, "m/d/yyyy")# #TimeFormat(Start_Time, "h:mmtt")#&nbsp;-&nbsp;#TimeFormat(End_Time, "h:mmtt")# at #Site# in #City#</li>
						</cfloop>
					</ul>
					
				</cfif>

			<cfelse>
				
				<p>You have no workshops eligible for site support funds.  If you believe you are eligible for site support funds please contact Cash for College at <a href="mailto:#application.adminEmail#">#application.adminEmail#</a>.</p>
			
			</cfif>
		
		<cfelse>

			<cfset fund = application.fundGateway.get(fundID)>
			<cfif fundID eq 0>
				<cfset organization = application.organizationGateway.get(organizationID)>
				<cfset requestedBy = application.userGateway.get(authUser.getUser_ID(), organizationID)>
				<cfset workshops = application.fundWorkshopGateway.getAllAsQuery(workshopIDs = unfundedApprovedWorkshopIDs)>
			<cfelse>
				<cfset organization = application.organizationGateway.get(fund.getOrganization_ID())>
				<cfset requestedBy = application.userGateway.get(fund.getRequested_By_ID(), organization.getOrganization_ID())>
				<cfset workshops = application.fundWorkshopGateway.getAllAsQuery(fundIDs = fundID)>
			</cfif>
			
			<cfset hasFutureWorkshops = false>
			<cfloop query="workshops">
				<cfif dateCompare(Workshop_Date, now()) neq -1>
					<cfset hasFutureWorkshops = true>
					<cfbreak>
				</cfif>
			</cfloop>
			
			<cfif hasFutureWorkshops>
				<p>You are hosting workshops that have not yet occurred. Please return to the Get Support Funds tab to request site support after all workshops are completed. Thank you.</p>
			<cfelse>
				<cfset county = application.countyGateway.get(organization.getCounty_ID())>
				<cfset reqRegionID = county.getRegion_ID()>
				<cfset workshopIDs = ValueList(workshops.Workshop_ID)>
		
				<cfif fundID eq 0 or (IsUserInRole("Super User") or IsUserInRole("Regional Admin")) or (NOT fund.getApproved() and IsUserInRole("Organizer"))>
					<cfset canSave = true>
				<cfelse>
					<cfset canSave = false>
				</cfif>
				<cfset canDelete = false>
				<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
					<cfset canApprove = true>
				<cfelse>
					<cfset canApprove = false>
				</cfif>
				
				<script language="javascript" type="text/javascript" src="common/datetimepicker.js"></script>
				
				<cfform name="fundForm" id="fundForm" action="#script_name#" method="post">
					<cfinput type="hidden" name="fundID" value="#fundID#">
					<cfinput type="hidden" name="organizationID" value="#organizationID#">
					<cfinput type="hidden" name="requestedByID" value="#requestedBy.getUser_ID()#">
					<cfinput type="hidden" name="m" value="fundFormSave">
					<cfinput type="hidden" name="view" value="#rv#">
				
					<div class="buttonBar">
						<a href="#script_name#?view=fund&fundID=#fundID#&organizationID=#organizationID#" class="formLink2">Cancel</a>
						<cfif canSave>
							<cfinput type="submit" name="saveButton" id="saveButton" value="Save" class="formButton">
						</cfif>
						<cfif canDelete>
							<a href="" onclick="confirmDelete(); return false;" class="formLink">Delete</a>
						</cfif>
					</div>
					
					<!--- <cfif authUser.getRole() neq "Super User" and authUser.getRole() neq "Regional Admin"> --->
					
						<table class="detail" style="width: 790px;">
							<tr>
								<th colspan="2">2012 Cash for College Support Funds Request &amp; Organizer Survey</th>
							</tr>
							<tr>
								<td>
			
								<p>To help defray the costs to conduct your workshop(s), Cash for College is offering organizations, campuses and high school sites $300 in site support funds per workshop.</p>
								
								<p>Only workshop sites with 25 or more returned 2012 Student Exit Surveys may receive the $300 in site support funds. If your site did not return 25 exit surveys, it is not eligible to receive 2012 Site Support Funds.  Please apply for the funds by completing the following Application and Organizer Survey. The Statewide Cash for College office will determine eligibility based on verified returned surveys.  If you have questions or concerns you may refer back to the 2012 Partnership Agreement available in your organization account.</p>
								
								<p><b>To Apply</b><br />
								Complete and submit this 2012 Workshop Site Support Funds Application and Organizer Survey no later than Friday, March 30, 2012. If your sites exist in a Cash for College <a href="http://www.calgrants.org/index.cfm?navId=35" target="_blank">designated region</a>, your Regional Cash for College office will follow up with you and send an email notification regarding the specific process that will be used to issue payment to your organization. If your sites are not in a Cash for College region, complete the following Funds Request and Organizer Survey. Payments will be issued from the State of California.</p>
			
								</td>
							</tr>
						</table>
					
					<!--- </cfif> --->
					
					<table class="form">
						<tr>
							<td colspan="2" class="formHeader">Fund Details</td>
						</tr>
						<cfif fundID gt 0>
							<tr>
								<th>Fund ID:</th>
								<td>#fund.getFund_ID()#</td>
							</tr>
						</cfif>
						<tr>
							<th>Status:</th>
							<td>
								<cfif canApprove>
									<cfinput type="hidden" name="oldApproval" value="#fund.getApproved()#">
									<select name="approved">
										<option value="0"<cfif fund.getApproved() eq 0> selected</cfif>>Not approved</option>
										<option value="1"<cfif fund.getApproved() eq 1> selected</cfif>>Approved</option>
									</select>
								<cfelse>
									<cfinput type="hidden" name="approved" value="#fund.getApproved()#">
									<cfif fundID eq 0>New<cfelseif fund.getApproved()>Approved<cfelse><cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")><font color="red">Not approved</font><cfelse>Pending approval</cfif></cfif>
								</cfif>
							</td>
						</tr>
						<cfif fund.getApproved() and isDate(fund.getApproved_Date())>
							<tr>
								<th>Approval Date:</th>
								<td>#dateFormat(fund.getApproved_Date(), "m/d/yyyy")#</td>
							</tr>
							<cfset approvedBy = application.userGateway.get(fund.getApproved_By_ID(), 0)>
							<tr>
								<th>Approved By:</th>
								<td>#approvedBy.getFirst_Name()# #approvedBy.getLast_Name()#</td>
							</tr>
						</cfif>
						<tr>
							<th>Requested By:</th>
							<td>
								<cfif requestedBy.getApproved()>
									#requestedBy.getFirst_Name()# #requestedBy.getLast_Name()#<br>
								<cfelseif NOT requestedBy.getApproved()>
									<font color="red">#requestedBy.getFirst_Name()# #requestedBy.getLast_Name()#</font><br>
								</cfif>
							</td>
						</tr>
						<cfif fundID eq 0>
							<tr>
				    			<th>Request Date:</th>
				    			<td>#DateFormat(now(), "m/d/yyyy")#</td>
				    		</tr>
						<cfelse>
							<tr>
				    			<th>Request Date:</th>
				    			<td>#DateFormat(fund.getDate_Created(), "m/d/yyyy")#</td>
				    		</tr>
						</cfif>
						<cfif fundID eq 0>
							<tr>
				    			<th>Signature:</th>
				    			<td><cfinput type="text" name="signature" value="" required="true" message="Signature is required" size="36" maxlength="200"></td>
				    		</tr>
						</cfif>
					</table>
					
					<!--- organization --->
					<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
						<div>
							<cfinclude template="#request.pathToUI#/details/organization.cfm">
						</div>
					</cfif>
					
					<!--- mailing information --->
					<table class="panel">
						<thead>
							<tr>
								<th colspan="2">Payee Mailing Contact/Address</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td colspan="2">
									<p>Enter the exact organization name as it should appear on the check and the exact address where payment should be mailed.</p>
									
									<p>If incorrect mailing address is provided, your payment may be delayed or lost. Also note, payment will only be made to organizations, <u>not individuals</u>.</p>
								</td>
							</tr>
							<tr>
								<th nowrap="nowrap">First Name:</th>
								<td><cfinput type="text" name="mailingFirstName" value="#fund.getPayee_First_Name()#" required="yes" message="First Name is required" size="36" maxlength="50"></td>
							</tr>
							<tr>
								<th nowrap="nowrap">Last Name:</th>
								<td><cfinput type="text" name="mailingLastName" value="#fund.getPayee_Last_Name()#" required="yes" message="Last Name is required" size="36" maxlength="50"></td>
							</tr>
							<tr>
								<th>Organization/School:</th>
								<td><cfinput type="text" name="mailingOrganization" value="#fund.getPayee_Organization()#" required="yes" message="Organization/School is required" size="36" maxlength="200"></td>
							</tr>
							<tr>
								<th>Office/Dept:</th>
								<td><cfinput type="text" name="mailingAddress2" value="#fund.getPayee_Address2()#" required="no" size="36" maxlength="200"></td>
							</tr>
							<tr>
								<th>Mailing Address:</th>
								<td><cfinput type="text" name="mailingAddress1" value="#fund.getPayee_Address1()#" required="yes" message="Address is required" size="36" maxlength="200"></td>
							</tr>
							<tr>
								<th>City:</th>
								<td><cfinput type="text" name="mailingCity" value="#fund.getPayee_City()#" required="yes" message="City is required" size="36" maxlength="100"></td>
							</tr>
							<tr>
								<th>State:</th>
								<td>CA</td>
							</tr>
							<tr>
								<th>Zip Code:</th>
								<td><cfinput type="text" name="mailingZipCode" value="#fund.getPayee_Zip_Code()#" required="yes" message="Zip Code is required and must be a valid zip code" validate="zipcode" size="7" maxlength="5"></td>
							</tr>
							<tr>
								<th>Phone:</th>
								<td>
									<cfinput type="text" name="mailingPhone" value="#fund.getPayee_Phone()#" required="yes" message="Phone is required and must be a valid telephone number" size="15" maxlength="15" validate="telephone">
								</td>
							</tr>
							<tr>
								<th>E-mail:</th>
								<td><cfinput type="text" name="mailingEmail" value="#fund.getPayee_Email()#" required="yes" message="E-mail is required and must be a valid e-mail address" validate="email" size="36" maxlength="100"></td>
							</tr>
							<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
								<tr>
									<th>Organization Tax ID:</th>
									<td><cfinput type="text" name="mailingTaxID" value="#fund.getPayee_TaxID()#" required="no" size="36" maxlength="200"></td>
								</tr>
							</cfif>
						</tbody>
					</table>
					
					<!--- workshops --->
					<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
						<cfset colCount = 9>
					<cfelse>
						<cfset colCount = 6>
					</cfif>
				
					<table class="list" style="width: 790px;">
						<tr>
							<th colspan="#colCount#">Workshops</th>
						</tr>
						<tr style="background-color: ##e9e9e9;">
							<td><b>Date/Time</b></td>
							<td><b>Site</b></td>
							<td><b>Student<br />Count</b></td>
							<td><b>Parent/<br />Guardian<br />Count</b></td>
							<td><b>Staff/<br />Volunteer<br />Count</b></td>
							<td><b>Computer<br />Count</b></td>
							<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
								<td><b>Survey<br />Count</b></td>
								<td><b>Web/<br />Paper</b></td>
								<td><b>Fund<br />Amount</b></td>
							</cfif>
						</tr>
						<cfloop query="workshops">
							<tr<cfif currentRow mod 2 eq 0> class="evenRow"<cfelse> class="oddRow"</cfif>>
								<td>
									<cfif IsNumeric(Fund_Workshop_ID) and Fund_Workshop_ID gt 0>
										<input type="hidden" name="fundWorkshopID_#Workshop_ID#" value="#Fund_Workshop_ID#">
									<cfelse>
										<input type="hidden" name="fundWorkshopID_#Workshop_ID#" value="0">
									</cfif>
									#DateFormat(Workshop_Date, "m/d/yyyy")# #TimeFormat(Start_Time, "h:mmtt")#&nbsp;-&nbsp;#TimeFormat(End_Time, "h:mmtt")#
								</td>
								<td>#Site#</td>
								<td width="70"><cfinput type="text" id="studentCount_#Workshop_ID#" name="studentCount_#Workshop_ID#" value="#Student_Count#" required="yes" message="Workshop Student Count for #Site# on #DateFormat(Workshop_Date, 'm/d/yyyy')# is required and must be a number. Enter 0 (zero) if the workshop was cancelled." validate="regular_expression" pattern="^[0-9]+$" size="5" maxlength="5"></td>
								<td width="70"><cfinput type="text" id="parentCount_#Workshop_ID#" name="parentCount_#Workshop_ID#" value="#Parent_Count#" required="yes" message="Workshop Parent/Guardian Count for #Site# on #DateFormat(Workshop_Date, 'm/d/yyyy')# is required and must be a number. Enter 0 (zero) if the workshop was cancelled." validate="regular_expression" pattern="^[0-9]+$" size="5" maxlength="5"></td>
								<td width="70"><cfinput type="text" id="volunteerCount_#Workshop_ID#" name="volunteerCount_#Workshop_ID#" value="#Volunteer_Count#" required="yes" message="Workshop Staff/Volunteer Count for #Site# on #DateFormat(Workshop_Date, 'm/d/yyyy')# is required and must be a number. Enter 0 (zero) if the workshop was cancelled." validate="regular_expression" pattern="^[0-9]+$" size="5" maxlength="5"></td>
								<td width="70"><cfinput type="text" id="computerCount_#Workshop_ID#" name="computerCount_#Workshop_ID#" value="#Computer_Count#" required="yes" message="Workshop Computer Count for #Site# on #DateFormat(Workshop_Date, 'm/d/yyyy')# is required and must be a number. Enter 0 (zero) if the workshop was cancelled." validate="regular_expression" pattern="^[0-9]+$" maxlength="5"></td>
								<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
									<td><cfif len(exitSurveyCount)>#exitSurveyCount#<cfelse>0</cfif></td>
									<td>#Int(webSurveyCount)#/#Int(paperSurveyCount)#</td>
									<td width="70">
										<select name="fundAmount_#Workshop_ID#" id="fundAmount_#Workshop_ID#">	
											<option value=""></option>
											<option value="300"<cfif Fund_Amount eq 300> selected</cfif>>$300</option>
											<option value="0"<cfif Fund_Amount eq 0> selected</cfif>>$0</option>
										</select>
									</td>
								<cfelse>
									<input type="hidden" name="fundAmount_#Workshop_ID#" value="#Fund_Amount#">
								</cfif>
							</tr>
						</cfloop>
					</table>
			
					<!--- survey --->
					<cfinclude template="#request.pathToUI#/forms/fund-survey.cfm">
	
					<p><b>Thank you, we appreciate the time you took to complete this survey!</b></p>
					
					<div class="buttonBar">
						<cfif IsUserInRole("Super User") or IsUserInRole("Regional Admin")>
							<a href="#script_name#?view=#rv#" class="formLink2">Cancel</a>
						</cfif>
						<cfif canSave>
							<cfinput type="submit" name="saveButton" id="saveButton" value="Save" class="formButton">
						</cfif>
						<cfif canDelete>
							<a href="" onclick="confirmDelete(); return false;" class="formLink">Delete</a>
						</cfif>
					</div>
				
				</cfform>		
				
			</cfif>
			
		</cfif>
			
	</cfif>

</cfoutput> ---> --->